package net.wanho.customerManage.service.impl;

import net.wanho.commons.exception.DaoException;
import net.wanho.commons.exception.ServiceException;
import net.wanho.commons.factory.BeanFactory;
import net.wanho.customerManage.dao.CustomerDao;
import net.wanho.customerManage.dao.WorkingFieldDao;
import net.wanho.customerManage.po.WorkingField;
import net.wanho.customerManage.service.WorkingFieldService;

import java.util.List;

public class WorkingFieldServiceImpl implements WorkingFieldService {
    private WorkingFieldDao workingFieldDao = BeanFactory.getBean(WorkingFieldDao.class) ;
    @Override
    public List<WorkingField> selectAllWorkingField() throws ServiceException {
        try {
            return workingFieldDao.selectAllWorkingField() ;
        } catch (DaoException e) {
            e.printStackTrace();
            throw new ServiceException(e.getMessage()) ;
        }
    }
}
